home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / dhrgcd.zip / DHRGCD.INF (.txt) < prev    next >
OS/2 Help File  |  1992-07-01  |  11KB  |  253 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Description ΓòÉΓòÉΓòÉ
  3.  
  4. The DHRGCD.CMD REXX file implements a command line directory change function 
  5. across all accessible hard disks on your PC.  This is similar to the Peter 
  6. Norton NCD DOS command (without graphics) but provides a single index for all 
  7. hard disks.  It is provided in REXX source format so may be easily customized 
  8. if desired. 
  9.  
  10. The index file (DIRINFO.GCD) is an ASCII CR/LF delimited file that may be 
  11. viewed with any editor.  It will contain all directories that exist on the 
  12. disks selected for indexing.  The index will be placed in the root directory of 
  13. the boot disk.  The destination may be changed if desired. 
  14.  
  15.  
  16. ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
  17.  
  18. The file DHRRU100.DLL must be placed in a directory that is specified in the 
  19. LIBPATH statement in your CONFIG.SYS.  After OS/2 installation the LIBPATH 
  20. usually contains at least d:\OS2\DLL and d:\OS2\APPS\DLL (where d: is the 
  21. installation drive).  It may be placed in either of these directories or any 
  22. other directory in the LIBPATH statement. 
  23.  
  24. The file DHRGCD.CMD must be placed in a directory that is specified in the SET 
  25. PATH statement in your CONFIG.SYS.  After OS/2 installation the SET PATH 
  26. usually contains at least d:\OS2 and d:\OS2\SYSTEM (where d: is the 
  27. installation drive).  It may be placed in either of these directories or any 
  28. other directory in the SET PATH statement. 
  29.  
  30. The file DHRGCD.INF must be placed in a directory that is specified in the 
  31. BOOKSHELF statement in your CONFIG.SYS.  After OS/2 installation the BOOKSHELF 
  32. usually contains at least d:\OS2\BOOK (where d: is the installation drive).  It 
  33. may be placed in that directory or in another directory by adding the other 
  34. directory to your BOOKSHELF statement. 
  35.  
  36. The file DHRGCD.DOC may be placed anywhere convenient as it is not referenced 
  37. by DHRGCD.CMD. 
  38.  
  39.  
  40. ΓòÉΓòÉΓòÉ 3. Initialization ΓòÉΓòÉΓòÉ
  41.  
  42. To initialize the directory index (DIRINFO.GCD), use - 
  43.  
  44. DHRGCD /r [search_disk_options] 
  45.   or 
  46. DHRGCD /rq [search_disk_options] 
  47.  
  48. The option /r will build the index and display all directories found. The 
  49. option /rq will build the index without the display of directories (quietly). 
  50. The optional search_disk_options may be used to override the default of all 
  51. accessible hard disks known to OS/2.  To build an index only for disks D &  E 
  52. enter - 
  53.  
  54. DHRGCD /rq DE 
  55.  
  56. Note:  The /r or /rq option should be used whenever directories are added or 
  57. deleted to synchronize the index with the actual contents of the hard disk. 
  58.  
  59.  
  60. ΓòÉΓòÉΓòÉ 4. Usage ΓòÉΓòÉΓòÉ
  61.  
  62. To jump to another directory on the current disk or on another disk, just enter 
  63. the directory name as the first parameter - 
  64.  
  65. DHRGCD dll 
  66.  
  67. will change to the directory ...\...DLL... found on any disk searched when the 
  68. index was created.  The search for directory name will only be successful if it 
  69. appears as part of the last qualifier of a directory in whole or part.  The 
  70. specification of DLL will match 
  71.  
  72.   \ABC\DEF\DLL1
  73.   \ABC\123DLL
  74.   \DLL
  75. but not
  76.   \DLL1\ABC
  77.  
  78. If multiple destinations are possible, a selection list will be displayed - 
  79.  
  80.   There are multiple possibilities - 
  81.   1 \ABC\DEF\DLL1 
  82.   2 \ABC\123DLL 
  83.   3 \DLL 
  84.   Enter Selection Number, 0 for No Change, or Just 
  85.    Press Enter for Item 3 
  86.  
  87. This will be repeated until a number in the range 0 to 3 is entered.  If an 
  88. exact match is found, it will be used as the default for the enter key.  If 
  89. multiple exact matches are found, the last one will be the default for the 
  90. enter key. 
  91.  
  92. Directories containing spaces may also be matched by using the double quote (") 
  93. character around the directory - 
  94.  
  95.   DHRGCD "A B C" 
  96.  
  97. To restrict the change to the present disk, use the option 
  98.  /l 
  99. Example - 
  100.  DHRGCD /l DLL 
  101.  
  102. will show directories that match DLL only on the current disk. 
  103.  
  104. The index file (DIRINFO.GCD) is an ASCII CR/LF delimited file that may be 
  105. viewed with any editor.  It will contain all directories that exist on the 
  106. disks selected for indexing.  The index will be placed in the root directory of 
  107. the boot disk.  The destination may be changed if desired. 
  108.  
  109.  
  110. ΓòÉΓòÉΓòÉ 5. Errors ΓòÉΓòÉΓòÉ
  111.  
  112. When an error is detected, messages will be displayed and the CMD will exit 
  113. with a non-zero return code. The return codes are - 
  114.  
  115.   4 - Help information was displayed 
  116.   8 - Directory target not found in index 
  117.  12 - Missing parameters 
  118.  16 - Invalid option entered 
  119.  20 - Error changing to directory target - recreate index 
  120.  24 - No directories found - index file not created 
  121.  28 - Index file not found - use /r to create index 
  122.  32 - Error finding DHRRU100 DLL 
  123.  36 - Error processing DHRRU100 DLL 
  124.  40 - Error writing to index file 
  125.  44 - Unable to find a local disk for storage of index file 
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 6. Customization ΓòÉΓòÉΓòÉ
  129.  
  130. The DHRGCD.CMD file is a REXX file which contains source. It may be modified 
  131. with any editor. At the start of the file are four REXX variables that control 
  132. how the CMD operates. The destination of where the index file will be placed 
  133. may be customized by two options. The default is to place the index file on the 
  134. boot disk. 
  135.  
  136. The variable 
  137.   use_current_disk_index 
  138. when set to 'Y' will place the index on the disk where the command is executed. 
  139. This will allow a separate index for each hard disk. The CMD file is delivered 
  140. with this set to 'N'. 
  141.  
  142. If use_current_disk_index is not set to 'Y', the variable 
  143.   use_boot_disk_index 
  144. when set to 'Y' will place the index on the boot disk. If 
  145. use_current_disk_index is not 'Y' and use_boot_disk_index is also not 'Y', the 
  146. index will be placed on the first local hard disk. The CMD file is delivered 
  147. with this set to 'Y'. This option is provided to allow the containment of all 
  148. OS/2 files on a single disk. This CMD was developed on a PC where disk C is a 
  149. DOS 5 - OS/2 1.3 dual boot primary partition, disk D is an OS/2 FAT bootable 
  150. logical partition, and disk I is an OS/2 HPFS bootable logical partition on a 
  151. second physical disk. DHRGCD.CMD will search disk D for the index file when 
  152. booted from disk D and search disk I when booted from disk I. 
  153.  
  154. The DHRGCD.CMD file will use the ANSI.SYS control strings to adjust display 
  155. colors.  One consequence is that the current colors can not be saved and if 
  156. changed the display will be left with a white foreground on a black background. 
  157. If this is not desirable, the use of ANSI control strings may be eliminated by 
  158. setting the variable 
  159.   use_ansi_colors 
  160. to 'N'.  Or the default exit value (ansi_white) may be changed to match the 
  161. colors you are currently using. 
  162.  
  163. The default disks to be indexed are the combination of local hard disks and 
  164. remote disks known to OS/2 at the time the index request is processed. To index 
  165. only local hard disks, set the value of variable 
  166.   use_all_disks 
  167. to 'N'. 
  168.  
  169. The CMD file may be renamed.  One suggestion is to rename DHRGCD.CMD to GCD.CMD 
  170. and create a second CMD file called CCD.CMD (Current disk Change Directory) 
  171. that invokes GCD.CMD with the '/l' parameter.  This would provide global access 
  172. with GCD and current disk only access with CCD. Example - 
  173.  
  174. /* This is a REXX exec */ 
  175. parse arg dest 
  176. if left(dest,1) = '/' then do 
  177.   say 'Invalid Destination ('dest') - use DHRGCD for options' 
  178.   exit 16 
  179. end 
  180. call 'GCD' '/l' dest 
  181. exit result 
  182.  
  183.  
  184. ΓòÉΓòÉΓòÉ 7. Disclaimer ΓòÉΓòÉΓòÉ
  185.  
  186. DHRGCD.CMD and DHRRU100.DLL are distributed as is, with no guarantee that they 
  187. will work correctly in all situations.  In no event will the Author be liable 
  188. for any damages whatsoever, including, without limitation, loss of profit, loss 
  189. of information, or special, incidental, or consequential damages or other 
  190. similar claims, arising out of the use of or inability to use these files, even 
  191. if the Author has been advised of the possibility of such damages, or for any 
  192. claim by any other party. 
  193.  
  194.  
  195. ΓòÉΓòÉΓòÉ 8. Copyright ΓòÉΓòÉΓòÉ
  196.  
  197. The files DHRGCD.CMD and DHRRU100.DLL are placed in the public domain with the 
  198. restriction that some parts may have been previously copyrighted by others. 
  199. You may use, redistribute, or modify these files without restriction by the 
  200. Author. 
  201.  
  202.  
  203. ΓòÉΓòÉΓòÉ 9. Modifications ΓòÉΓòÉΓòÉ
  204.  
  205. Since this is a REXX command file, the source is available for modification by 
  206. anyone.  The Author would appreciate notification of any major modifications so 
  207. that they may be reviewed for inclusion in future versions (if any). 
  208.  
  209.  
  210. ΓòÉΓòÉΓòÉ 10. Author ΓòÉΓòÉΓòÉ
  211.  
  212. The DHRGCD.CMD file, DHRRU100.DLL, and associated files were created by Dennis 
  213. H. Rosenthal. The Author may be reached via CompuServe ID 75176,3003. 
  214.  
  215.  
  216. ΓòÉΓòÉΓòÉ 11. DHRRU100 DLL Notes ΓòÉΓòÉΓòÉ
  217.  
  218. To determine the OS/2 boot disk, a REXX callable DLL was created based on the 
  219. REXXUTIL DLL.  It has a single function that returns the information from the 
  220. OS/2 2.0 DosQuerySysInfo request.  The DHRGCD.CMD only uses one variable, 
  221. stem.5, which contains the boot disk number.  A total of 23 variables will be 
  222. returned along with descriptions.  Example (reminder - '/*' must begin in 
  223. column 1 on first line of cmd file to invoke REXX processing) - 
  224.  
  225. /* This is a REXX exec */ 
  226. /* 
  227. ** Use RxFuncAdd to identify the DLL and register an entry point 
  228. */ 
  229. if RxFuncQuery('DHRSysInfo') then 
  230.   call RxFuncAdd 'DHRSysInfo','DHRRU100','DHRSysInfo' 
  231. call DHRSysInfo 'infoval', 'infodesc' 
  232. /* On return, RESULT will contain "0" or > "0" */ 
  233. if result > 0 then do 
  234.   say 'Error in DHRSysInfo, rc =' result 
  235.   exit result 
  236. end 
  237. /* infoval.0 contains the count of variables returned */ 
  238. say 'Count of variables returned =' infoval.0 
  239. do varnum = 1 to infoval.0 
  240.  say left(infodesc.varnum,30) infoval.varnum 
  241. end 
  242. exit 
  243.  
  244. The call to DHRSysInfo requires one REXX stem variable name and optionally a 
  245. second REXX stem variable name.  The variable stem.0 will contain the count of 
  246. data item returned in stem.1 through stem.n.  The first variable name is used 
  247. to return values.  The second variable name, if supplied, is used to return 
  248. descriptions for the values in the first variable.  A result code of 0 
  249. indicates that the function executed correctly.  A result code greater than 
  250. zero will indicate a problem with extracting the information or storing the 
  251. information in a REXX variable.  An error message will be displayed with more 
  252. specific information.  A parameter error will produce a severe REXX error and 
  253. terminate the CMD file.